from launch import LaunchDescription
from launch_ros.actions import Node

from ament_index_python.packages import get_package_share_directory
import os

def generate_launch_description():
    pkg_share_dir = get_package_share_directory('b2_tf_pub')
    config_path = os.path.join(pkg_share_dir, 'config', 'parameters.yaml')

    action_odom_tf_pub = Node(
        package='b2_tf_pub',
        executable='odom_tf_pub',
        parameters=[config_path]
    )

    return LaunchDescription([
        action_odom_tf_pub
    ])
